import request from "@/axios/request";
import url from "@/axios/url";
const { mesUrl, adminUrl } = url();
// 导出url
export const exportUrl = `${mesUrl}mesProdProperties/export`;
// 分页查询
export function getList (params = {}) {
  return request({
    url: `${mesUrl}mesProdProperties`,
    method: "get",
    params,
  });
}
// 新增
export function rowCreate (data = {}) {
  return request({
    url: `${mesUrl}mesProdProperties`,
    method: "post",
    data,
  });
}
// 修改
export function rowUpdate (data = {}) {
  return request({
    url: `${mesUrl}mesProdProperties`,
    method: "put",
    data,
  });
}
// 删除
export function rowDel (id) {
  return request({
    url: `${mesUrl}mesProdProperties/${id}`,
    method: "delete",
  });
}
// 详情
export function rowDetail (id) {
  return request({
    url: `${mesUrl}mesProdProperties/info/${id}`,
    method: "get",
  });
}
export function getYesOrNotList () {
  return request({
    url: `${adminUrl}dict/type/yes_or_not`,
    method: "get",
  });
}
// 启用
export function publish (id) {
  return request({
    url: `${mesUrl}mesProdProperties/enable/${id}`,
    method: "get",
  });
}
// 停用
export function deactivate (id) {
  return request({
    url: `${mesUrl}mesProdProperties/disable/${id}`,
    method: "get",
  });
}
